home *** CD-ROM | disk | FTP | other *** search
-
-
-
- uuuuiiiioooopppphhhhyyyyssssiiiioooo((((DDDD3333XXXX)))) uuuuiiiioooopppphhhhyyyyssssiiiioooo((((DDDD3333XXXX))))
-
-
-
- NNNNAAAAMMMMEEEE
- _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo - set up user data space for I/O
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_bbbb_uuuu_ffff_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_uuuu_iiii_oooo_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
-
- _iiii_nnnn_tttt _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo_((((_iiii_nnnn_tttt _((((_****_s_t_r_a_t_))))_((((_ssss_tttt_rrrr_uuuu_cccc_tttt _bbbb_uuuu_ffff _****_))))_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _bbbb_uuuu_ffff _****_b_p_,,,, _dddd_eeee_vvvv______tttt _d_e_v_,,,,
- _iiii_nnnn_tttt _r_w_f_l_a_g_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _uuuu_iiii_oooo _****_u_i_o_p_))))_;;;;
-
- AAAArrrrgggguuuummmmeeeennnnttttssss
- _s_t_r_a_t
- Address of the driver routine.
-
- _b_p Pointer to the _bbbb_uuuu_ffff(D4) structure describing the I/O request.
-
- _d_e_v External device number.
-
- _r_w_f_l_a_g
- Flag indicating whether the access is a read or a write.
-
- _u_i_o_p Pointer to the _uuuu_iiii_oooo(D4) structure that defines the user space of the
- I/O request.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo prepares the user's address space for DMA I/O and encapsulates
- the transfer information in a buffer header.
-
- RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
- _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo returns 0 if the result is successful, or the appropriate error
- number on failure. If a partial transfer occurs, the _u_i_o structure is
- updated to indicate the amount not transferred and an error is returned.
- _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo returns the _E_N_O_S_P_C error if an attempt is made to read beyond
- the end of the device. If a read is performed at the end of the device, 0
- is returned. _E_N_O_S_P_C is also returned if an attempt is made to write at or
- beyond the end of a the device. _E_F_A_U_L_T is returned if user memory is not
- valid. _E_A_G_A_I_N is returned if _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo could not lock all of the pages.
-
- UUUUSSSSAAAAGGGGEEEE
- _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo performs the following functions:
-
- +o Sets up a buffer header describing the transfer; faults pages in and
- locks the pages impacted by the I/O transfer so they can't be
- swapped out
-
- +o Calls the routine named in the _s_t_r_a_t parameter, passing a pointer to
- a _b_u_f structure
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- uuuuiiiioooopppphhhhyyyyssssiiiioooo((((DDDD3333XXXX)))) uuuuiiiioooopppphhhhyyyyssssiiiioooo((((DDDD3333XXXX))))
-
-
-
- +o Sleeps until the transfer is complete and is awakened by a call to
- _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3) from the driver's I/O completion handler
-
- +o Performs the necessary cleanup and updates, then returns to the
- driver routine
-
- If _b_p is set to _N_U_L_L, a buffer is allocated temporarily and freed after
- the transfer completes.
-
- If _r_w_f_l_a_g is set to _B__R_E_A_D, the direction of the data transfer will be
- from the kernel or device to the user's buffer. If _r_w_f_l_a_g is set to
- _B__W_R_I_T_E, the direction of the data transfer will be from the user's
- buffer to the kernel or device.
-
- LLLLeeeevvvveeeellll
- Base only.
-
- SSSSeeeeeeee AAAAllllssssoooo
- _bbbb_uuuu_ffff(D4), _iiii_oooo_cccc_tttt_llll(D2), _rrrr_eeee_aaaa_dddd(D2), _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy(D2), _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk(D3), _uuuu_iiii_oooo(D4),
- _wwww_rrrr_iiii_tttt_eeee(D2)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-